<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 
        vh,vw h=height,w=width
        1vw=1/100的当前窗口的宽度
        窗口被我调整 400,1vw=4px
        30*4=120px -->
        <!-- 
        vmax 宽与高对比,谁大就将谁作为参考
        此时,高比宽,就将高划分为100份 1/100*30
        
        vmin 宽与高对比,谁小就将谁作为参考-->
    <style>
        html,body{
            width: 100%;
            height: 100%;
        }
        .box{
            height: 30vw;
            width: 30vw;
            background-color: pink;
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>